package com.fesco.mis.fm.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * <descption></descption>
 * @date ：2017/9/4 9:37
 * @author：梅海波<meihaibo13186@sinosoft.com.cn>
 * @version:0.1
 */
class EnumException extends RuntimeException {

    private static final long serialVersionUID = -3456483498862876456L;

    //错误的枚举返回
    @Getter
    @Setter
    private ExceptionEnum responseEnum;

    //补充错误信息
    @Setter
    private String suffix;

    EnumException(ExceptionEnum responseEnum) {
        this.responseEnum = responseEnum;
    }

    EnumException(ExceptionEnum responseEnum, String suffix) {
        super();
        this.responseEnum = responseEnum;
        this.suffix = suffix;
    }

    String getSuffix() {
        if (suffix == null) {
            return "";
        }
        return suffix;
    }

}
